home *** CD-ROM | disk | FTP | other *** search
/ HAKERIS 11 / HAKERIS 11.ISO / soft / development / Macromedia RoboHelp X5 / RoboHelpOffice.exe / Data1.cab / _15CFDA377E944CEDBCFB9A2EF75DC22B < prev    next >
Encoding:
Text File  |  2002-08-31  |  5.5 KB  |  236 lines

  1. <html>
  2. <head>
  3. <title> Navigation Pane </title>
  4. <!--%WH_PROJECT_METATAGS%-->
  5. <script language="javascript" src="<!--%SF_VERSION_JS%-->"></script>
  6. <script language="javascript1.2" src="<!--%SF_MESSAGE_JS%-->"></script>
  7. <script language="javascript1.2" src="<!--%SF_PROXY_JS%-->"></script>
  8. </head>
  9. <script language="javascript">
  10. <!--
  11. var strFrmToc="";
  12. var strFrmNdx="";
  13. var strFrmFts="";
  14. var strFrmGls="";
  15. var strFrmDft="";
  16. var gstrName="";
  17.  
  18. //set overwrite here
  19. function setListFrames(strToc,strNdx,strFts,strGls,strDefault)
  20. {
  21.     strFrmToc=strToc;
  22.     strFrmNdx=strNdx;
  23.     strFrmFts=strFts;
  24.     strFrmGls=strGls;
  25.     strFrmDft=strDefault;
  26.     if(strFrmDft==strFrmToc)
  27.         gstrName="toc";
  28.     else if(strFrmDft==strFrmNdx)
  29.         gstrName="idx";
  30.     else if(strFrmDft==strFrmFts)
  31.         gstrName="fts";
  32.     else if(strFrmDft==strFrmGls)
  33.         gstrName="glo";
  34. }
  35.  
  36. function setWebHelpPane()
  37. {
  38.     %%%OutputNavpaneDefaultListFrames("setListFrames(\"%s\",\"%s\",\"%s\",\"%s\",\"%s\");");%%%
  39. }
  40.  
  41. function window_unload()
  42. {
  43.     if(!gbNav4||gbNav6) // resize will call unload, but the register code will never be called on Netscape 4.
  44.     {
  45.         UnRegisterListener2(this,WH_MSG_SHOWTOC);
  46.         UnRegisterListener2(this,WH_MSG_SHOWIDX);
  47.         UnRegisterListener2(this,WH_MSG_SHOWFTS);
  48.         UnRegisterListener2(this,WH_MSG_SHOWGLO);
  49.         UnRegisterListener2(this,WH_MSG_GETPANEINFO);
  50.     }
  51. }
  52.  
  53. function window_onload()
  54. {
  55.     var bHidePane=false;
  56.     var oMsg=new whMessage(WH_MSG_GETCMD,this,1,null);
  57.     if(SendMessage(oMsg))
  58.     {
  59.         if(oMsg.oParam>0)
  60.         {
  61.             if(oMsg.oParam==1)
  62.                 gstrName="toc";
  63.             else if(oMsg.oParam==2)
  64.                 gstrName="idx";
  65.             else if(oMsg.oParam==3)
  66.                 gstrName="fts";
  67.             else if(oMsg.oParam==4)
  68.                 gstrName="glo";
  69.             switchNvp(gstrName);
  70.         }
  71.         else if(oMsg.oParam==0)
  72.         {
  73.             bHidePane=true;
  74.         }
  75.         else if(gstrName)
  76.             switchNvp(gstrName);
  77.     }
  78.     if(bHidePane)
  79.     {
  80.         oMsg=new whMessage(WH_MSG_HIDEPANE,this,1,null)
  81.         SendMessage(oMsg);
  82.     }
  83.     else if(gstrName)
  84.     {
  85.         oMsg=new whMessage(WH_MSG_PANEINFO,this,1,gstrName);
  86.         SendMessage(oMsg);
  87.     }
  88.     oMsg=new whMessage(WH_MSG_NOSYNC,this,1,null);
  89.     SendMessage(oMsg);
  90.     oMsg=new whMessage(WH_MSG_NOSEARCHINPUT,this,1,null);
  91.     SendMessage(oMsg);
  92.  
  93. }
  94.  
  95. function switchNvp(strName)
  96. {
  97.     var strFile="";
  98.     if(strName=="toc")        strFile=strFrmToc;
  99.     else if(strName=="idx")    strFile=strFrmNdx;
  100.     else if(strName=="fts")    strFile=strFrmFts;
  101.     else if(strName=="glo")    strFile=strFrmGls;
  102.  
  103.     gstrName=strName;
  104.     frames[0].location=strFile;    
  105. }
  106.  
  107. function onSendMessage(oMsg)
  108. {
  109.     if(oMsg)
  110.     {
  111.         var onMsg=null;
  112.         var nMsgId=oMsg.nMessageId;
  113.         if(nMsgId==WH_MSG_SHOWTOC)
  114.         {
  115.             switchNvp("toc");
  116.             onMsg=new whMessage(WH_MSG_PANEINFO,this,1,"toc");
  117.             SendMessage(onMsg);
  118.             onMsg=new whMessage(WH_MSG_SHOWPANE,this,1,null);
  119.             SendMessage(onMsg);
  120.         }
  121.         else if(nMsgId==WH_MSG_SHOWIDX)
  122.         {
  123.             switchNvp("idx");
  124.             onMsg=new whMessage(WH_MSG_PANEINFO,this,1,"idx");
  125.             SendMessage(onMsg);
  126.             onMsg=new whMessage(WH_MSG_SHOWPANE,this,1,null);
  127.             SendMessage(onMsg);
  128.         }
  129.         else if(nMsgId==WH_MSG_SHOWFTS)
  130.         {
  131.             switchNvp("fts");
  132.             onMsg=new whMessage(WH_MSG_PANEINFO,this,1,"fts");
  133.             SendMessage(onMsg);
  134.             onMsg=new whMessage(WH_MSG_SHOWPANE,this,1,null);
  135.             SendMessage(onMsg);
  136.         }
  137.         else if(nMsgId==WH_MSG_SHOWGLO)
  138.         {
  139.             switchNvp("glo");
  140.             onMsg=new whMessage(WH_MSG_PANEINFO,this,1,"glo");
  141.             SendMessage(onMsg);
  142.             onMsg=new whMessage(WH_MSG_SHOWPANE,this,1,null);
  143.             SendMessage(onMsg);
  144.         }
  145.         else if(nMsgId==WH_MSG_GETPANEINFO)
  146.         {
  147.             oMsg.oParam=gstrName;
  148.             return false;
  149.         }
  150.     }
  151.     return true;
  152. }
  153.  
  154. function onResize()
  155. {
  156.     var oMsg=null;
  157.     if(gbIE4)
  158.     {
  159.         if(document.body)
  160.         {
  161.             if(document.body.clientWidth>1&&document.body.clientHeight>1)
  162.             {
  163.                 oMsg=new whMessage(WH_MSG_RESIZEPANE,this,1,null);
  164.                 SendMessage(oMsg);
  165.             }
  166.         }
  167.     }
  168.     else
  169.     {
  170.         if(window.innerWidth!=0&&window.innerHeight!=0)
  171.         {
  172.             oMsg=new whMessage(WH_MSG_RESIZEPANE,this,1,null);
  173.             SendMessage(oMsg);
  174.         }
  175.     }
  176. }
  177.  
  178. if(window.gbWhMsg&&window.gbWhVer&&window.gbWhProxy)
  179. {
  180.     var oMsg=new whMessage(WH_MSG_GETPANES,this,1,null);
  181.     if(SendMessage(oMsg))
  182.     {
  183.         if(oMsg.oParam)
  184.         {
  185.             for(var i=0;i<oMsg.oParam.aPanes.length;i++)
  186.             {
  187.                 if(oMsg.oParam.aPanes[i].sPaneName=="toc")
  188.                     strFrmToc=oMsg.oParam.aPanes[i].sPaneURL;
  189.                 else if(oMsg.oParam.aPanes[i].sPaneName=="idx")
  190.                     strFrmNdx=oMsg.oParam.aPanes[i].sPaneURL;
  191.                 else if(oMsg.oParam.aPanes[i].sPaneName=="fts")
  192.                     strFrmFts=oMsg.oParam.aPanes[i].sPaneURL;
  193.                 else if(oMsg.oParam.aPanes[i].sPaneName=="glo")
  194.                     strFrmGls=oMsg.oParam.aPanes[i].sPaneURL;
  195.                 if(oMsg.oParam.sDefault==oMsg.oParam.aPanes[i].sPaneName)
  196.                 {
  197.                     strFrmDft=oMsg.oParam.aPanes[i].sPaneURL;
  198.                 }
  199.             }
  200.         }
  201.         else
  202.             setWebHelpPane();
  203.     }
  204.     else
  205.         setWebHelpPane();
  206.  
  207.     RegisterListener2(this,WH_MSG_SHOWTOC);
  208.     RegisterListener2(this,WH_MSG_SHOWIDX);
  209.     RegisterListener2(this,WH_MSG_SHOWFTS);
  210.     RegisterListener2(this,WH_MSG_SHOWGLO);
  211.     RegisterListener2(this,WH_MSG_GETPANEINFO);
  212.  
  213.     if(gbIE55)
  214.         window.onresize=onResize;
  215.  
  216.     window.onunload=window_unload;
  217.     window.onload=window_onload;
  218.  
  219.     var strHtml="";
  220.     strHtml+="<frameset rows=\'100%,*\'>";
  221.     strHtml+="<frame name=\'nvplist\' title=\'navpane frame\' src=\'" + strFrmDft +"\'></frame>";
  222.     strHtml+="<frame src=\'%%%SF_BLANK_HTM%%%\' noresize></frame>";
  223.     strHtml+="</frameset>";
  224.     document.write(strHtml);
  225. }
  226. else
  227.     document.location.reload();
  228.  
  229. if(window.gbNav6)
  230. {
  231.     var oMsg=new whMessage(WH_MSG_RELOADNS6,this,1,null);
  232.     SendMessage(oMsg);
  233. }
  234. //-->
  235. </script>
  236. </html>